from django import template

register = template.Library()

@register.filter
def getall(query_set):
    return query_set.all() # 调用all()方法